-
-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wayland backend #535
Merged
Merged
Wayland backend #535
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…, but there's a segfault when the text is replaced (cancelled). Reading the clipboard data just hangs so it's commented out for now.
- Implement Wayland key repeat - Implement Wayland clipboard and drag_n_drop - Rename `Platform::linux_x11_wm_class` to `linux_wm_class` for both X11 and Wayland usage - Use `eglSwapInterval`
Remove `event_handler` from the payload and add `EVENTS` to the payload. Essentially we now maintain our own event queue.
- Make the event handlers of listeners not `Option` anymore. - Let `wl_listener` macro write all the dummy event handlers - High-dpi support - Construct all the `wl_proxy` in `registry_add_object` (except the `wl_data_device`)
- Add new struct `PointerContext` - Support cursor shape and cursor grab - Move the `wl_request` macros to `libwayland_client.rs`
- Make `wayland_use_fallback_decorations` deprecated
- There is no reason to normalize the mouse wheel value to {-1,0,1}: it's not done on other platforms, and this just makes the input very imprecise
not-fl3
reviewed
Feb 28, 2025
Wow, what a PR, great work! I do not have much to add, looks super good to me. This is correct, this code was basically maintained by @narodnik, so I would wait for their feedback too. |
57b6d2a
to
bfe3a6b
Compare
- Fullscreen - High-dpi - Drag-n-drop "premature finish error"
bfe3a6b
to
0199be8
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We now have
libdecor
, which is what xwayland uses (I removed the old fallback decorations: it looks bad but more importantly it also messes up the cursor positioning, and I don't want to manually fix the offset)Probably some tests are needed before merging, especially under different compositors and on different machines (I tested on
mutter
,hyprland
, andsway
, and I've had the same code working under one but not another...)Also I did modify the code structure quite a bit. Probably gonna be bad for others who worked/are working on it (@narodnik maybe? btw I rebased upon your clipboard implementation; it got me started so your work is not in vain :)
There's still some code that's a bit messy; also it'd probably be nice for the X11 and Wayland implementations to share more common patterns, which I didn't pay enough attention. But at least it works now :)